- var version = "/html5";

//- 在niginx配置中设置的静态资源的路径
- var cssPath = version+"/css/";
- var libPath = version+"/js/lib/";
- var jobPath = version+"/js/job/";
- var htmPath = version+"/page/";
- var imgPath = version+"/images/";
- var jadeRuntime = libPath+"runtime.js";
- var modulePath = version+"/js/modules/";
- var pagePath = version+"/";

mixin html_encode(str)
    - var s = "";
    - if (str.length == 0)
        | #{s}
    - else
        s = str.replace(/&/g, "&gt;");
        s = s.replace(/</g, "&lt;");
        s = s.replace(/>/g, "&gt;");
        s = s.replace(/ /g, "&nbsp;");
        s = s.replace(/\'/g, "&#39;");
        s = s.replace(/\"/g, "&quot;");
        s = s.replace(/\n/g, "<br>");
        | #{s}
 
mixin html_decode(str)
    - var s = "";
    - if (str.length == 0)
        | #{s}
    - else
        s = str.replace(/&gt;/g, "&");
        s = s.replace(/&lt;/g, "<");
        s = s.replace(/&gt;/g, ">");
        s = s.replace(/&nbsp;/g, " ");
        s = s.replace(/&#39;/g, "\'");
        s = s.replace(/&quot;/g, "\"");
        s = s.replace(/<br>/g, "\n");
        | #{s}